package net.dlvx.vlex.wx.lasting.model;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.io.Serializable;

@Data
@Entity
public class Msg implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    private Long msgId;

    /**
     * 信息
     * */
    @Column(nullable = false)
    private String content;

    @Column
    private int see;

    @Column(nullable = false)
    private String msgType;

    @Column
    private String scanCodeInfo;

    @Column
    private String sendPicsInfo;

    @Column
    private String sendLocationInfo;

    @Column(nullable = false)
    private String fromUser;

    @Column(nullable = false)
    private String toUser;

    @Column(nullable = false)
    private Long createTime;

    @Column
    private Long feedbackTime;

    public Msg() {
    }

    public Msg(Long msgId, String content, String msgType, String fromUser, String toUser, Long createTime) {
        this.msgId = msgId;
        this.content = content;
        this.msgType = msgType;
        this.see = 0;
        this.fromUser = fromUser;
        this.toUser = toUser;
        this.createTime = createTime;
    }

}
